home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / fs / stadir.c.D < prev    next >
Text File  |  1990-07-25  |  2KB  |  87 lines

  1. *** /tmp/,RCSt1022250    Wed Jul 25 13:49:02 1990
  2. --- stadir.c    Mon Jul 23 11:34:26 1990
  3. ***************
  4. *** 9,24 ****
  5.    */
  6.   
  7. ! #include "../h/const.h"
  8. ! #include "../h/type.h"
  9. ! #include "../h/error.h"
  10. ! #include "../h/stat.h"
  11. ! #include "const.h"
  12. ! #include "type.h"
  13.   #include "file.h"
  14.   #include "fproc.h"
  15. - #include "glo.h"
  16.   #include "inode.h"
  17.   #include "param.h"
  18.   
  19.   /*===========================================================================*
  20.    *                do_chdir                     *
  21. --- 9,22 ----
  22.    */
  23.   
  24. ! #include "fs.h"
  25. ! #include <sys/stat.h>
  26.   #include "file.h"
  27.   #include "fproc.h"
  28.   #include "inode.h"
  29.   #include "param.h"
  30.   
  31. + FORWARD int change();
  32. + FORWARD int stat_inode();
  33.   /*===========================================================================*
  34.    *                do_chdir                     *
  35. ***************
  36. *** 73,77 ****
  37.     struct inode *rip;
  38.     register int r;
  39. -   extern struct inode *eat_path();
  40.   
  41.     /* Try to open the new directory. */
  42. --- 71,74 ----
  43. ***************
  44. *** 107,111 ****
  45.     register struct inode *rip;
  46.     register int r;
  47. -   extern struct inode *eat_path();
  48.   
  49.     /* Both stat() and fstat() use the same routine to do the real work.  That
  50. --- 104,107 ----
  51. ***************
  52. *** 128,132 ****
  53.   
  54.     register struct filp *rfilp;
  55. -   extern struct filp *get_filp();
  56.   
  57.     /* Is the file descriptor valid? */
  58. --- 124,127 ----
  59. ***************
  60. *** 152,155 ****
  61. --- 147,153 ----
  62.     vir_bytes v;
  63.   
  64. +   /* Update the atime, ctime, and mtime fields in the inode, if need be. */
  65. +   if (rip->i_update) update_times(rip);
  66.     /* Fill in the statbuf struct. */
  67.     stp = &statbuf;        /* set up pointer to the buffer */
  68. ***************
  69. *** 166,172 ****
  70.       (fil_ptr->filp_mode == R_BIT))    /* on the reading end, */
  71.       stp->st_size -= fil_ptr->filp_pos; /* adjust the visible size. */
  72. !   stp->st_atime = rip->i_modtime;
  73. !   stp->st_mtime = rip->i_modtime;
  74. !   stp->st_ctime = rip->i_modtime;
  75.   
  76.     /* Copy the struct to user space. */
  77. --- 164,170 ----
  78.       (fil_ptr->filp_mode == R_BIT))    /* on the reading end, */
  79.       stp->st_size -= fil_ptr->filp_pos; /* adjust the visible size. */
  80. !   stp->st_atime = rip->i_atime;
  81. !   stp->st_mtime = rip->i_mtime;
  82. !   stp->st_ctime = rip->i_ctime;
  83.   
  84.     /* Copy the struct to user space. */
  85.